package com.lms.domain;

import java.sql.Date;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.JoinTable;
import javax.persistence.OneToOne;
import javax.persistence.PrimaryKeyJoinColumn;
import javax.persistence.Table;

import org.hibernate.annotations.Cascade;

@Entity
@Table(name = "LoginDetails")
public class LoginDetails {

//	private int serialNo;
	private int employeeId;
	private String password;
	private Date lastLogin;
	private String Role;

	
/*	@GeneratedValue
	@Column(name = "Serial_No")
	public int getSerialNo() {
		return serialNo;
	}*/

	/*public void setSerialNo(int serialNo) {
		this.serialNo = serialNo;
	}*/
	@Id
	public int getEmployeeId() {
		return employeeId;
	}

	public void setEmployeeId(int employeeId) {
		this.employeeId = employeeId;
	}

	

	@Column(name = "PASSWORD")
	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	@Column(name = "LAST_LOGIN")
	public Date getLastLogin() {
		return lastLogin;
	}

	public void setLastLogin(Date lastLogin) {
		this.lastLogin = new java.sql.Date(new java.util.Date().getTime());
	}

	@Column(name = "ROLE")
	public String getRole() {
		return Role;
	}

	public void setRole(String role) {
		Role = role;
	}

}
